CC	=	g++

CFLAGS	= -Wall -fPIC `sdl-config --cflags` -g -O0
LDFLAGS = -lGL -lGLU -lglut `sdl-config --libs` -lSDL_image -lSDL_ttf

BUILDDIR = ../../build/

DEFINE	= -DDEBUG

TOBUILD = UIComposite.o UIEngine.o UIImage.o UIJPGImage.o \
	  UILeaf.o UIPNGImage.o UIText.o UIWindow.o

DEPEND = $(addprefix $(BUILDDIR),$(TOBUILD))

all: $(DEPEND) testui

$(BUILDDIR)%.o:%.cpp
	$(CC) -o $@ -c $< $(DEFINE) $(INCLUDE_PATH) $(CFLAGS)

clean:
	rm -rf $(DEPEND)

###############################
# for UI testing purpose only #
###############################
testui:$(DEPEND) TestUI.o
	$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)